package com.ryan.mms.position.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ryan.framework.dto.DtoUtil;
import com.ryan.framework.tag.pagination.Page;
import com.ryan.mms.position.dao.PositionDao;
import com.ryan.mms.position.dto.PositionDto;
import com.ryan.mms.position.model.Position;
import com.ryan.mms.position.service.PositionService;

@Service
public class PositionServiceImpl implements PositionService<PositionDto, Position, Long> {
	
	@Autowired
	private PositionDao<Position,Long> positionDao;

	@SuppressWarnings("unchecked")
	private DtoUtil<PositionDto,Position> positionDtoUtil = DtoUtil.getInstance(PositionDto.class, Position.class);

	@Override
	public PositionDto save(PositionDto dto) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public PositionDto update(PositionDto dto) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void delete(PositionDto dto) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deleteById(Long pk) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public PositionDto findById(Long pk) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<PositionDto> getAll(Page page) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void deleteAll(List<Long> pks) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<PositionDto> find(Page page, PositionDto positionDto) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<PositionDto> getAll() {
		return positionDtoUtil.convertModels2Dtos(positionDao.getAll());
	}
	
	public void setPositionDao(PositionDao<Position, Long> positionDao) {
		this.positionDao = positionDao;
	}
}
